<script>
import {menuApi} from "@/api"
export default {
  async created() {
    const { path } = this.$route
    const allMenuList = await menuApi.getMenuListIgnoreBtnMenu()
    const isAppPage = allMenuList.some(item => {
      return item.path === path
    }) 
    const name = isAppPage ? "page401" : "page404"
    this.$router.replace({name, query: {href: location.href}})
  },
  render: function(h) {
    return h() // avoid warning message
  }
}
</script>